/**
 * @file container.h
 * @author ThomasKingFree (dulu150@126.com)
 * @brief
 * @version 0.1
 * @date 2021-03-21
 *
 * @copyright Copyright (c) 2021
 *
 */

#ifndef YUE_GUI_CONTAINER_H
#define YUE_GUI_CONTAINER_H

#include "utils/list.h"
#include "widgets/simple_widget.h"

namespace YueGUI {
class Container : public SimpleWidget {
public:
    Container() = delete;
    Container(uint8_t containerVectorSize, uint8_t widgetVectorSize);
    ~Container();

    bool Add(SimpleWidget &widget);
    bool Remove(SimpleWidget &widget);

    bool Add(Container &container);
    bool Remove(Container &container);

private:
    TinyStd::Vector *widgetVector_ = nullptr;
    TinyStd::Vector *containerVector_ = nullptr;
    Container *parent_ = nullptr;
};
} // namespace YueGUI
#endif // YUE_GUI_CONTAINER_H
